line by passing the distance=XXX option to the filter. Distance
options may be expressed in feet (distance=3f) or meters
(distance=1m). The default is zero feet, essentially a duplicate
- position.
+ position.
For example:
are declared on the command line by passing the distance=X.XX,
lat=X.XX, and lon=X.XX options to the filter. Distance options
may be expressed in miles (distance=3M) or kilometers (distance=3K).
- The default is zero miles.
+ The default is zero miles. Additionally, the exclude option may
+ be specified to reverse the effect of the filter, so that points
+ further from the center are kept and closer points are discarded.
For example:
static char *distopt;
static char *latopt;
static char *lonopt;
+static char *exclopt;
waypoint * home_pos;
{"lat", &latopt, "Latitude for center point (D.DDDDD)"},
{"lon", &lonopt, "Longitude for center point (D.DDDDD)"},
{"distance", &distopt, "Maximum distance from center"},
+ {"exclude", &exclopt, "Exclude points close to center"},
{0, 0, 0}
};
/* convert radians to float point statute miles */
dist = (((dist * 180.0 * 60.0) / M_PI) * 1.1516);
- if (dist >= pos_dist) {
+ if ((dist >= pos_dist) == (exclopt == NULL)) {
waypt_del(waypointp);
waypt_free(waypointp);
continue;